package cz.kfad.ofrss.backend;

import cz.kfad.ofrss.model.Category;
import cz.kfad.ofrss.model.Channel;
import cz.kfad.ofrss.model.RssFeed;
import cz.kfad.ofrss.model.RssFeedShort;

import java.util.List;

public interface IBackend {

    List<Category> findAllCategories();

    List<Channel> findAllChannels();

    List<RssFeedShort> findFeedsForChannel(int channelId);

    List<RssFeedShort> findFeedsForCategory(int categoryId);

    RssFeed findFeed(int feedId);

    void setFeedIsRead(int feedId);

    Channel findChannelById(int channelId);

    Category findCategoryById(int categoryId);

    void refreshFeeds();

    void deleteFeed(int itemId);

    void deleteChannel(int channelId);

    void deleteCategory(int categoryId);

    void saveChannel(Channel channel);

    void saveCategory(Category category);

    boolean isUrlLive(String url);

    List<RssFeed> findFeeds();

    void editChannel(Channel channel);

    void editCategory(Category category);

    List<RssFeedShort> findAllFeeds(String orderBy);

    void fetchChannel(Channel channel);

    int getCountUnreadFeeds();
}
